<template>
  <div style="width: 100%; height: calc( 100% - 16px ); padding-top: 16px">
    <Chart :cdata="cdata" />
  </div>
</template>

<script>
import Chart from './chart.vue';
export default {
  props: {
    data: {
      type: Array,
      default: () => []
    },
  },
  data () {
    return {
      cdata: {}
    }
  },
  components: {
    Chart,
  },
  watch: {
    data: {
      handler(newData) {
        this.cdata = {
          indicatorData: [
            { name: "敬业度", max: 10 },
            { name: "学历值", max: 10 },
            { name: "人气值", max: 10},
            { name: "专业技能值", max: 10 },
            { name: "作品值", max: 10 }
          ],
          data: newData
        }
      },
      immediate: true,
      deep: true
    }
  }
}
</script>
